package com.symria.server.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;

/**
 * IosAdConfig entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "IOS_AD_CONFIG")
public class IosAdConfig implements java.io.Serializable {


	// Fields

	private Integer packId;
	private String packName;
	private String appId;
	private String type;
	private String checkMatch;
	private String source;
	private String clickUrl;
	private String status;

	// Constructors

	/** default constructor */
	public IosAdConfig() {
	}

	/** minimal constructor */
	public IosAdConfig(Integer packId) {
		this.packId = packId;
	}

	/** full constructor */
	public IosAdConfig(Integer packId, String appId, String type,
			String checkMatch, String source, String clickUrl, String status) {
		this.packId = packId;
		this.appId = appId;
		this.type = type;
		this.checkMatch = checkMatch;
		this.source = source;
		this.clickUrl = clickUrl;
		this.status = status;
	}

	// Property accessors
	@Id
	@Column(name = "PACK_ID", unique = true, nullable = false)
	public Integer getPackId() {
		return this.packId;
	}

	public void setPackId(Integer packId) {
		this.packId = packId;
	}

	@Column(name = "APP_ID", length = 32)
	public String getAppId() {
		return this.appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	@Column(name = "TYPE", length = 8)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "CHECK_MATCH", length = 64)
	public String getCheckMatch() {
		return this.checkMatch;
	}

	public void setCheckMatch(String checkMatch) {
		this.checkMatch = checkMatch;
	}

	@Column(name = "SOURCE", length = 32)
	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "CLICK_URL", length = 256)
	public String getClickUrl() {
		return this.clickUrl;
	}

	public void setClickUrl(String clickUrl) {
		this.clickUrl = clickUrl;
	}

	@Column(name = "STATUS", length = 1)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
    @Formula("(SELECT p.PACK_NAME FROM PACK_INFO p WHERE p.ID=PACK_ID)")
	public String getPackName() {
		return packName;
	}
	public void setPackName(String packName) {
		this.packName = packName;
	}

}